package gjbsh.bangong;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import gjbsh.bangong.ds.service.ActivateBGService;

@RestController
public class ActivateController {

	private Logger logger = LoggerFactory.getLogger(getClass());
	
	@Autowired
	ActivateBGService ddActivateBGService;
	
	
	@RequestMapping("activate_bg")
	public Integer activate_bg() {
		try {
			return ddActivateBGService.activateBG();
		} catch (Exception e) {
			logger.error(e.getMessage());
			return 0;
		}
	}	
}
